const Mock = require('mockjs')
const fruit = Mock.mock('@shuffle(["山楂","西瓜","梨","菠萝","苹果" ,"香蕉","菠菜" ,"桃子","石榴"])')
const fruitvalue = fruit.map(v => {
    return Mock.mock({
        "number|1-100": 100
    })
})
const fr = [];

fruit.forEach((v, i) => {
    let obj = {}
    obj.name = v
    obj.value = fruitvalue[i].number
    fr.push(obj)
});


var obj = {
    code: 2000,
    data: fr
}

// console.log(obj);

module.exports = [{
    url: '/admin/getSaleResult',
    type: 'get',
    response: config => {
        return {
            code: 20000,
            data: fr
        }
    }
}]